package com.spm.librarianmanagersystem.controller;

import com.spm.librarianmanagersystem.utils.JsonResult;
import com.spm.librarianmanagersystem.utils.UserContextHolder;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LogoutController {
    @PostMapping("/api/user/logout")
    public JsonResult<Object> logout(){
        UserContextHolder.clearCurrentUserId();
        return new JsonResult<>();
    }
}
